export function fn(data) {
    let arr = []
    function deep(data) {
        data.forEach(item => {
            if (item.children.length) {
                deep(item.children)
            } else {
                arr.push({
                    path: '/' + item.path,
                    name: item.path,
                    component: () => import(`../views/list/${item.path}.vue`)
                })
            }
        })
    }
    deep(data)
    return arr
}